This invention relates to a communication system for a network including a bus for controlling a factory automation apparatus or the like, comprising a master unit for controlling the network, slaves for connecting I/O devices and repeaters for shaping and amplifying a communication frame.
Remote I/O networks of a programmable controller (PLC) comprising a single master and a plurality of slaves and repeaters are already known. FIG. 17 shows an example of such a network, or a network system comprised of a single master unit 70, slave units 80a-80d (or slaves #1-#4) and repeater units 90a-90d (or repeaters #1-#4) wherein the repeaters are formed in two stages.
In the above, the PLC is formed as a combination of units such as a control unit (CPU unit 20) for carrying out a user program, an input-output unit (an I/O unit) connecting input devices and output devices (together referred to as I/O devices) and a communication master unit connecting to a remote I/O network for communicating input-output data (I/O data) with the slave units. The master unit 70 may be understood as corresponding to a set of programmable controllers or to the communication master unit 10 of the PLC. This network is formed as a network including a bus and the master unit is for controlling this network, being incorporated in the programmable controller. The slave units are connected to the I/O devices (not shown) and serve to control the output devices based on output data stored in a communication frame received from the master unit and to return to the master unit input data taken in from input devices by storing in a communication frame in response to a request from the master unit. The repeater units are for carrying out waveform shaping and amplification processes on communication frames that are transmitted and received on the network. Thus, whenever a request frame from the master unit to each of the slave units or a response frame from each of the slave units to the master unit is communicated and passes through a repeater unit, shaping and amplification processes are carried out and hence a delay of a specified length (a repeater delay) required for such processes is experienced. FIG. 21 is an operation flow of request frames transmitted from the master unit and response frames from the slave units at observation points A, B, C and D shown in FIG. 17 as a time sequence.
As shown in FIG. 17, Slave #1 is directly connected to the master unit without any repeater unit in between. For this reason, the response from slave unit 80a at Observation Point A has no repeater delay, and the response frame from Slave #1 is transmitted as soon as the trigger frame from the master unit is completed. By contrast, there is a repeater unit between Slave #2 and the master unit and there are two repeater units each between Slaves #3 and #4 and the master unit. Thus, a repeater delay is generated whenever a trigger frame transmitted to Slave #2, #3 or #4 passes through a repeater unit. A repeater delay is also generated when a response frame from these slave units passes through a repeater unit. For this reason, as disclosed in Japanese Patent Publication Tokkai 2004-280304, time gaps used to be provided between responses from the slaves by taking into consideration the repeater delays generated at the repeater units such that collisions between responses can be avoided.
At Observation Points B, C and D, too, response frames are similarly transmitted with time gaps appropriately provided as shown in FIG. 21 in view of these repeater delays that will be generated.
Since the system shown in FIG. 17 is a bus-type system, furthermore, each repeater unit is adapted to repeat all communication frames including both those flowing in the downstream direction and those flowing in the upstream direction. With a system structure as shown in FIG. 17, each response frame from Slave #3 passes through four repeater units (units 90d, 90c, 90a and 90b) to reach the master unit and the other slave units. The time required to reach Slave #4 will be four times the repeater delay. In order to avoid collisions of response frames from all of the slave units, therefore, the average time interval at Observation Point A must be four times the repeater delay. Thus, the communication cycle becomes equal to (the trigger frame time)+{(response frame time)+(repeater delay)×(maximum number of repeater stages)×2}×(number of slaves).
As explained, furthermore, prior art repeater units are adapted to repeat all communication frames including both those flowing downstream and those flowing upstream. Explained more in detail with reference to FIG. 21, response frames from Slave #1, for example, are transmitted not only to the master unit but also through the repeater units to the other slaves such as Slaves #2, #3 and #4. This is clear since the response frames from Slave #1 are observed at all Observation Points A, B, C and D. Similarly, response frames from all slave units are observed at all Observation Points A, B, C and D.
According to prior art methods, since responses are prevented from colliding by considering the repeater delay that takes places at each repeater unit to provide time intervals between responses from each slave unit. This gives rise to the problem of increased communication cycle by the length of the response intervals at each slave unit. Moreover, the occupation rate of the communication route is increased because the communication frames transmitted from each of the slave units on the network are repeated to the other slave units. This has the undesirable result of adversely affecting the communication capability.